/****************************** (C) COPYRIGHT 2016 RSEStudio ****************************
* File Name          : 
* Author             : RSES_Liyang
* Version            : V1.0.0
* Date               : 00-May-18
* Description        : 
*****************************************************************************************/

#ifndef __POWERMANAGER_H__
#define __POWERMANAGER_H__

/* Includes ----------------------------------------------------------------------------*/
//#include "Bsp.h"
//#include "button.h"
//#include "Rses_led.h"
/* Exported types ----------------------------------------------------------------------*/
typedef struct rses_led rses_led_t;

struct rses_led
{
    uint8_t routine;
    uint8_t led_instatus;
    uint16_t timer; 
    
	int32_t (*led_opera)(uint16_t mode);
};
/* Exported constants ------------------------------------------------------------------*/
extern rses_led_t led_run;
extern rses_led_t led_sys;
extern rses_led_t led_ble;

/* Exported macro ----------------------------------------------------------------------*/

#define LED_COLOR_BLACK             0
#define LED_COLOR_RED               0xF800
#define LED_COLOR_GREEN             0X07E0
#define LED_COLOR_BLUE              0x001F

/* Exported functions ----------------------------------------------------------------- */
int PowerManager_Start(void);
void Power_ON(void);
void Power_OFF(void);
void RTC_Update(void);
    
void led_ctl_func(uint32_t led,uint32_t code);
void rses_led_control(rses_led_t *led,int32_t status);

void i2c_uDelay(uint16_t x);
void ADS_nop(void);
uint8_t ADS_SendByte(uint8_t Data);
void ADS_WriteReg(uint8_t Addr,uint8_t Reg);
void ADS_ReadReg(uint8_t Addr,uint8_t *Reg);


#endif
/********************************(C)COPYRIGHT 2016 RSEStudio ****************************/
/*****************************************END OF FILE************************************/


